<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>Palo Alto Bicycle Club</title>
	<link rel="stylesheet" type="text/css" href="_stylesheets/pabc.css" />
        <link rel="stylesheet" type="text/css" href="datepicker/jquery.datepick.css" />
<!--
Filename: routeText.php

Primary Author: Tyler Mazaika
Coin 71 Group 1
Palo Alto Bicycle Club - Route Library

Prints the text of route supplied to variable "rID" through the "GET" method.
Requires "routelibrary.xml".
-->

    
<?php
        
        // Gets the data from the specified "route" in routelibrary.xml for printing inside <div id="routeText">

        $doc = new DOMDocument;
        $doc->load("routelibrary.xml");

        $routeIndex = $_GET['rID'];

        $selectedRoute = $doc->getElementsByTagName('route')->item( $routeIndex );

        $title = $selectedRoute->getElementsByTagName('title')->item( 0 )->nodeValue;
        $category = $selectedRoute->getElementsByTagName('category')->item( 0 )->nodeValue;
        $hilliness = $selectedRoute->getElementsByTagName('hilliness')->item( 0 )->nodeValue;
        $mileage = $selectedRoute->getElementsByTagName('mileage')->item( 0 )->nodeValue;
        $text = $selectedRoute->getElementsByTagName('text')->item( 0 )->nodeValue;
    ?>
    
    
</head>

<body>

<!-- HEADER -->
	<?php include("header.php") ?>
<!-- end HEADER -->

<!-- WRAPPER -->
<div id="wrapper">

	<!-- LEFT COL -->
	<div class="leftcol">
		<?php include("leftcol.php") ?>
	</div>
	<!-- END LEFT COL -->


	<!-- RIGHT COL -->
	<div class="rightcol">
		<!-- ********* MAIN PAGE CONTENT *********** -->
        <div id="routeLibrary">
        
        <div id="routeText">
            <a href="routelibrary.php">Back to Route Library</a>

            <?php echo "<h3>$title : $category / $hilliness / $mileage </h3><pre>$text</pre>";
            ?>


               
            <a href="routelibrary.php">Back to Route Library</a>
		</div>
        </div>


		<!-- ********* END MAIN CONTENT ************ -->
	</div>

</div>
<!-- end WRAPPER -->


<!-- FOOTER -->
	<?php include("footer.php") ?>
<!-- END FOOTER -->

</body>
</html>